import body from '@/components/body'
import childView from '@/components/appMain.vue'
const templateTree = resolve => { require(['@/views/interface/template/tree.vue'], resolve) }; //
const templateList = resolve => { require(['@/views/interface/template/list.vue'], resolve) }; //
const templateEdit = resolve => { require(['@/views/interface/template/edit.vue'], resolve) }; //
const templateReName = resolve => { require(['@/views/interface/template/rename.vue'], resolve) }; //
const templateSetting = resolve => { require(['@/views/interface/template/setting.vue'], resolve) }; //
const resourceTree = resolve => { require(['@/views/interface/resource/tree.vue'], resolve) }; //
const resourceList = resolve => { require(['@/views/interface/resource/list.vue'], resolve) }; //
const resourceEdit = resolve => { require(['@/views/interface/resource/edit.vue'], resolve) }; //
const resourceReName = resolve => { require(['@/views/interface/resource/rename.vue'], resolve) }; //
const contentMangeRouter ={
  path: '/contentMange', //内容
  name: '内容',
  component: body,
  iconCls: 'icon-file',
  meta: {
    isLink: true
  },
  children: [{
    path: '/content',
    name: '内容管理', //内容管理
    component: childView,
    isParent: true,
    redirect: '/content/list',
    children: [{
      path: '/content/list',
      name: '内容列表',
      component: resolve => {
        require(['@/views/content/content/list.vue'], resolve)
      }
    }, {
      path: '/content/save',
      name: '内容添加',
      component: resolve => {
        require(['@/views/content/content/add.vue'], resolve)
      }
    }, {
      path: '/content/update',
      name: '内容修改',
      component: resolve => {
        require(['@/views/content/content/edit.vue'], resolve)
      }
    }]
  }, {
    path: '/topic',
    name: '专题管理', //专题管理
    component: childView,
    isParent: true,
    redirect: '/topic/list',
    children: [{
      path: '/topic/list',
      name: '专题列表',
      component: resolve => {
        require(['@/views/content/topic/list.vue'], resolve)
      }
    },
      {
        path: '/topic/save',
        name: '专题添加',
        component: resolve => {
          require(['@/views/content/topic/edit.vue'], resolve)
        }
      },
      {
        path: '/topic/update',
        name: '专题修改',
        component: resolve => {
          require(['@/views/content/topic/edit.vue'], resolve)
        }
      }
    ]

  }]
}
export default contentMangeRouter
